export function loadBaiduScript() {
  if (window._loadBaiduScript) {
    const ele = document.getElementsByClassName('embed-icon-default')[0]
    if (ele) {
      ele.click()
    }
  } else {
    window._loadBaiduScript = true
    const hm = document.createElement('script')
    hm.src = 'https://hm.baidu.com/hm.js?da499033948d53311458c23bff12bc74'
    const s = document.getElementsByTagName('script')[0]
    s.parentNode.insertBefore(hm, s)
    setTimeout(() => {
      const zixunEle = document.getElementsByClassName('embed-icon')[0]
      if (zixunEle) {
        zixunEle.style.opacity = 0
      }
    }, 1000)
  }
}
